package Day13;

import java.util.ArrayList;

public class Max {
    private Max() {
    }

    public static int getMax(ArrayList<SStudent> list){
        int max = list.get(0).getAge();
        for (int i = 1; i < list.size(); i++) {
            SStudent stu = list.get(i);
            int  age = stu.getAge();
            if(age > max){
                max = age;
            }
        }
        return max;
    }
}
